package com.croa.service.ipml;

import com.croa.common.Const;
import com.croa.service.AdminService;
import com.dix.base.model.security.Token;
import com.dix.base.security.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;

@Service
public class AdminServiceImpl implements AdminService {

//    @Resource
//    private TokenService tokenService;

    @Override
    public HashMap login(String username, String password) {
//        TokenService tokenService = new TokenService();
        //管理员是否存在
        //验证密码
        //更新登录时间

//        Token token = tokenService.create(2, Const.TOKEN_USER_TYPE_ADMIN, 1, 0);
        HashMap resultData = new HashMap();
        resultData.put("admin","你好世界");
//        resultData.put("token",token);
        return resultData;
    }
}
